package ogl;
import java.util.ArrayList;


public class Army {

	public Warfactory warfactory;
	public Baracks baracks;
	public FootSoldier footsoldier;
	public Commando commando;
	public Tank tank;
	public TroopCrawler troopcrawler;

	public ArrayList<Buildings> buildings;
	public ArrayList<Units> units;

	public Army(){

		buildings = new ArrayList<Buildings>();
		units = new ArrayList<Units>();

	}

	public void buildWarfactory(float x, float y){

		warfactory = new Warfactory(x,y);
		buildings.add(warfactory);

	}

	public void buildBaracks(float x, float y){

		baracks = new Baracks(x,y);
		buildings.add(baracks);

	}

	public void buildFootSoldier(float x, float y){

		footsoldier = new FootSoldier(x,y);
		units.add(footsoldier);

	}

	public void buildCommando(float x, float y){

		commando = new Commando(x,y);
		units.add(commando);

	}
	
	public void buildTank(float x, float y){

		tank = new Tank(x,y);
		units.add(tank);

	}
	
	public void buildTroopCrawler(float x, float y){

		troopcrawler = new TroopCrawler(x,y);
		units.add(troopcrawler);

	}
	
	public void render(){
		
		for(Buildings builds : buildings)
			builds.render();
		
		for(Units un : units)
			un.render();
		
	}

}
